package com.intelli.eve.core.impl.io.local;

import com.intelli.eve.core.api.message.AbstractMessage;
import com.intelli.eve.core.api.message.Header;
import com.intelli.eve.core.api.message.MessageProtocols;

/**
 * Author: Sergey42
 * Date: 21.12.2014 19:40
 */
public class SystemMessage extends AbstractMessage<Header> {

    protected ComponentInvocationInfo componentInvocationInfo;

    public SystemMessage(Header header, ComponentInvocationInfo componentInvocationInfo) {
        super(header);
        this.componentInvocationInfo = componentInvocationInfo;
    }

    @Override
    public ComponentInvocationInfo getContent() {
        return componentInvocationInfo;
    }

    public ComponentInvocationInfo getComponentInvocationInfo() {
        return componentInvocationInfo;
    }

    @Override
    public void setHeader(Header header) {
        super.setHeader(header);
        header.setProtocol(MessageProtocols.MANAGED_COMPONENT);
    }
}
